export default function deletePage(state, { that, pageName }) {
  if (!state.page.tree[pageName]) {
    that.$message.error(`页面名为${pageName}的页面不存在`);
    return;
  }

  that.$delete(state.page.tree, pageName);
  that.$message({
    message: "页面成功删除",
    type: "success",
  });
}
